package com.aliyun.heiyu.powermaster.server.rotary.dao;

import com.aliyun.heiyu.powermaster.proto.AlgorithmRequest;
import com.aliyun.heiyu.powermaster.proto.AlgorithmsRequest;
import com.aliyun.heiyu.powermaster.server.rotary.object.entity.AlgorithmEntity;

import java.util.List;

public interface AlgorithmDAO {
    /**
    * @Description: 查询算法列表
    * @return:  List<AlgorithmEntity>
    * @Author: zhangshun
    * @Date: 2020/2/16
    */
     List<AlgorithmEntity> queryAlgorithms(AlgorithmsRequest request);
     /**
     * @Description: 查询算法详情
     * @Param:  id
     * @return:  AlgorithmEntity
     * @Author: zhangshun
     * @Date: 2020/2/16
     */
     AlgorithmEntity queryAlgorithmById(String id);
     /**
     * @Description: 删除算法
     * @Param:  id
     * @return:  int
     * @Author: zhangshun
     * @Date: 2020/2/16
     */
     boolean deleteAlgorithm(String id);
     /**
     * @Description: 修改算法
     * @Param:  request
     * @return:  int
     * @Author: zhangshun
     * @Date: 2020/2/16
     */
     boolean updateAlgorithm(AlgorithmRequest request);
     /**
     * @Description: 添加算法
     * @Param:  request
     * @return:  int
     * @Author: zhangshun
     * @Date: 2020/2/16
     */
     int addAlgorithm(AlgorithmRequest request);
    /**
    * @Description: 开启算法
    * @Param:  request
    * @return:  boolean
    * @Author: zhangshun
    * @Date: 2020/2/19
    */
     boolean updateAlgorithmSwitch(AlgorithmRequest request);

    /**
     * 查询算法是否存在
     * @param algoName
     * @return
     */
     AlgorithmEntity queryAlgoByName(String algoName);

    /**
     * 关闭所有算法
     * @return
     */
     boolean closeAlgos();

    /**
     * 查询在使用的算法
     * @return
     */
     AlgorithmEntity queryAlgoUse();

}
